# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-pyaml
pkgver=23.7.0
pkgrel=1
pkgdesc="PyYAML-based module to produce pretty and readable YAML-serialized data"
url="https://pypi.python.org/pypi/pyaml"
license=('BSD')
arch=('any')
depends=('python-yaml')
makedepends=('python-setuptools')
checkdepends=('python-unidecode')
optdepends=('python-unidecode: Needed if same-id objects or recursion is used within serialized data')
source=("https://pypi.io/packages/source/p/pyaml/pyaml-$pkgver.tar.gz")
sha512sums=('edbe58a3a7f1216a2463ac56af829c38b12b7194429691a92cb7f28ca926094e324d6e44d3fb64be40239dc8a6dc61d72946b107f5210ca83e73dec18b1428ef')

build() {
  cd pyaml-$pkgver
  python setup.py build
}

check() {
  cd pyaml-$pkgver
  python setup.py test
}

package() {
  cd pyaml-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname/
}
